home *** CD-ROM | disk | FTP | other *** search
- Path: howland.reston.ans.net!gatech!gt-news!james
- From: james@amber.biology.gatech.edu (James McIninch)
- Newsgroups: comp.lang.c
- Subject: Re: Limit on #bytes inside of struct?
- Date: 9 Feb 1996 15:17:14 GMT
- Organization: Georgia Institute of Technology
- Distribution: world
- Message-ID: <4ffohq$1gb@mordred.gatech.edu>
- References: <4feg1d$d4g@cville-srv.wam.umd.edu> <4ffg6b$ivd@sparcserver.lrz-muenchen.de>
- NNTP-Posting-Host: exon.biology.gatech.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- ua302aa@lrz-muenchen.de wrote:
- : jsquires@wam.umd.edu (jeffrey d squires) writes:
-
- : >I have the following:
-
- : >typedef struct {
- : > int zero;
- : > int one;
- : > int two;
- : > int three;
- : > int four;
- : > int five;
- : > int six;
- : > int seven_or_more;
- : >} hist_type;
-
- : >hist_type histogram;
- : >int num=2;
-
- : >histogram.four = 0; /* at this point, value of num changes from 2 to 0!!!*/
-
- : >Is there a limit on the number of bytes allowed inside of a struct?
-
- : Yes, there is a limit on the number of bytes allowed in one
- : object. That limit is 32k.
-
- No. There is no limit. Individual implementations of compilers or OS's may
- impose a limit, but there is no limit that is integral to the C languag itself.
-
-
- : >I am positive that the value of num changes from 2 before the last
- : >assignment to 0 after it. Any ideas?
-
- How do you know this? The code above doesn't even print anything out?
-
-
- : Not really :-(. It you can post a minimal example that demonstrates
- : this error, it might be possible to find the problem.
-
- What he said.
-
-
- : >Is this a bug in gcc?
- : Very improbable!
-
- Likewise.
-